#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#     Filename @  varinit.py
#       Author @  Huoty
#  Create date @  2015-05-29 15:00:27
#  Description @  
# *************************************************************

def calsum():
    sum = 0
    t = (1, 2, 3, 4, 5, 6, 7, 8)
    for data in t:
        sum += data 
        # 等价与 sum = sum + data, 如果没有先定义 sum = 0，则第一次求和时 sum 未定义

    return [t, sum]

# Script starts from here

if __name__ == "__main__":
    ret = calsum()
    print ret[0]
    print ret[1]
